home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / ADHESIVE.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.3 KB  |  67 lines

  1. # Adhesive Media PPP and SLIP script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # 5-9-95 CEL
  4.  
  5. STRING  username
  6. STRING  password
  7. STRING  framing
  8. STRING  IPAddress
  9.  
  10. # uncomment for debugging output
  11. # TRACE ON
  12.  
  13. SetTimeOut      60
  14.  
  15. CfgGetValue "Username" username
  16. IF result = 0 THEN
  17.     GetInput "Enter your username:" username
  18.     IF result = 0 THEN
  19.         PRINT "Warning, no username entered."
  20.     ELSE
  21.         PRINT "Username set to:";username
  22.     ENDIF
  23. ENDIF
  24.  
  25. CfgGetValue "Password" password
  26. IF result = 0 THEN
  27.     GetPassword "Enter your password:" password
  28.     IF result = 0 THEN
  29.         PRINT "Warning, no password entered."
  30.     ELSE
  31.         PRINT "Password set."
  32.     ENDIF
  33. ENDIF
  34.  
  35. CfgGetValue "Framing" framing
  36. IF result = 0 THEN
  37.     ABORT "Can't read 'Framing' setting from QDECK.INI."
  38. ENDIF
  39.  
  40. CommWaitFor "login:"
  41.  
  42. # The character before the user name indicates the type of connection.
  43. IF framing = "MPPPP" THEN
  44.     CommSend "P"
  45. ENDIF
  46. IF framing = "MPSLIP" THEN
  47.     CommSend "S"
  48. ENDIF        
  49.  
  50. CommSend username
  51. CommSend "%r"
  52.  
  53. CommWaitFor "password:"
  54.     CommSend password
  55.     CommSend "%r"
  56.  
  57. CommWaitFor    "to"
  58. CommReadIPAddr IPAddress
  59. IF result < 7 THEN    # IP Address length test
  60.     ABORT "Invalid IP Address!"
  61. ENDIF
  62. CfgSetValue "IPAddress" ipaddress
  63.  
  64. PRINT "%rIP Address set to:"; ipaddress
  65.  
  66. END
  67.